import React, {useEffect} from "react";
import {useSelector} from "react-redux";
import {useNavigate} from "react-router-dom";
import Userinfo from "./Userinfo";
import OrderList from "./OrderList";

const Order=()=>{
    const navigate = useNavigate()
    const city=useSelector(state => state.city)
    // const user=useSelector(state => state.login.user)

    useEffect(()=>{
        // if (!user.token){
        //     navigate('/login')
        // }
        // navigate('/login')
    },[])

    return (
        <div>
            <Userinfo city={city} />
            <OrderList city={city}/>
        </div>
    )
}
export default Order